<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/huowei/mes_goodslocation/mes_Goodslocation.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/huowei/mes_goodslocation/mes_Goodslocation.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '成品库货位',
                name: 'mes_goodslocation/mes_Goodslocation',
                url: "/mes_Goodslocation/",
                sortName: "id"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"goodsshelves":"","remark":"","create_time":"","goodslocation_name":"","goodsshelves_row":"","goodsshelves_column":"","max_num":"","used_num":"","warehouse_name":""});
            const searchFormOptions = ref([[{"title":"货架","field":"goodsshelves"}],[{"title":"备注","field":"remark"}],[{"title":"创建时间","field":"create_time"}],[{"title":"货位名称","field":"goodslocation_name"}],[{"title":"行","field":"goodsshelves_row"}],[{"title":"列","field":"goodsshelves_column"}],[{"title":"最大容量","field":"max_num","type":"decimal"}],[{"title":"已使用","field":"used_num","type":"decimal"}],[{"title":"仓库名称","field":"warehouse_name"}]]);
            const columns = ref([{field:'id',title:'主键',type:'int',sort:true,width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'goodsshelves',title:'货架',type:'string',width:220,align:'left',sort:true},
                       {field:'remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'status',title:'状态',type:'int',bind:{ key:'ordertype',data:[]},width:110,align:'left'},
                       {field:'create_time',title:'创建时间',type:'string',width:220,align:'left'},
                       {field:'goodslocation_name',title:'货位名称',type:'string',width:120,align:'left'},
                       {field:'goodslocation_no',title:'货位编号',type:'string',width:120,align:'left'},
                       {field:'goodsshelves_row',title:'行',type:'string',width:120,align:'left'},
                       {field:'goodsshelves_column',title:'列',type:'string',width:120,align:'left'},
                       {field:'max_num',title:'最大容量',type:'decimal',width:120,align:'left'},
                       {field:'used_num',title:'已使用',type:'decimal',width:120,align:'left'},
                       {field:'warehouse_id',title:'仓库 id 主键',type:'int',width:120,align:'left'},
                       {field:'warehouse_name',title:'仓库名称',type:'string',width:120,align:'left'},
                       {field:'warehouse_type',title:'仓库类型(1 原材料;2 成品;3 半成品)',type:'string',width:120,align:'left'},
                       {field:'is_default',title:'是否默认',type:'int',width:120,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
